<template>
    <div class="mine">
        <div class="content">
            <header>
            个人信息
            </header>
            <ul class="UserInfo">
                <li>
                        <div class="UserInfo-left">
                            <img :src="user.userImg" alt="">
                        </div>
                        <div class="UserInfo-right">
                            <h3>{{user.userName}}</h3>
                        </div>
                </li>
            </ul>
           
            <div class="starter">
                <button class="whitebut" @click="gotouseraddress()">
                <i class="el-icon-location"></i>
                我的地址
                </button>
                <button class="whitebut" >
                <i class="el-icon-location"></i>
                我的信息
                </button>
                
            </div>
            <button class="button" @click="delsession()">
                注销
            </button>
            <div class="footer-top">
            </div>
            <Footer></Footer>
        </div>
    </div>
    
</template>


<script>

import Footer from "../components/Footer";
export default {
    name:'Mine',
    data(){
        return{
            user:{}
        }
    },
    created(){
        this.user = this.$getSessionStorage("user");
    },
    components:{
        Footer,
    },
    methods:{
        delsession(){
            sessionStorage.clear();
            this.$router.push('/Login');  
        },
        gotouseraddress(){
            this.$router.push('/UserAddress');  
        }
    }
}
</script>


<style scoped>
/* 总容器 */
.content {
  width: 100%;
  height: 100%;
}
.content header{
    width: 100%;
    height: 12vw;
    background-color: #0097FF;
    font-size: 4.8vw;
    color: #FFF;
    text-align: center;
    line-height: 12vw;
    position: fixed;
    top: 0vw;
    left: 0vw;
    z-index: 999;
}
.starter
{
    margin-top: -4vw;
    height:auto;
    padding: 10px;
    text-align: center;
    font-size: 20px;
    color: rgb(107, 106, 106);
    background-color: rgb(255, 255, 255);
    text-decoration: none;
    cursor: pointer;
}
.button {
    /*margin-top: 12vw; */
    position: relative;
    background-color: rgb(228, 38, 13);
    border: none;
    font-size: 20px;
    color: #FFFFFF;
    padding: 20px;
    width: 100%;
    text-align: center;
    -webkit-transition-duration: 0.4s; /* Safari */
    transition-duration: 0.4s;
    text-decoration: none;
    overflow: hidden;
    cursor: pointer;
    border-radius: 14px;
}

.button:after {
    content: "";
    background: rgb(241, 121, 65);
    display: block;
    position: absolute;
    padding-top: 300%;
    padding-left: 350%;
    margin-left: -20px!important;
    margin-top: -120%;
    opacity: 0;
    transition: all 0.8s
}

.button:active:after {
    padding: 0;
    margin: 0;
    opacity: 1;
    transition: 0s
}

.whitebut {
    /*margin-top: 12vw; */
    position: relative;
    background-color: rgb(255, 255, 255);
    border: none;
    font-size: 17px;
    color: rgb(99, 99, 99);
    padding: 20px;
    width: 40%;
    text-align: center;
    -webkit-transition-duration: 0.4s; /* Safari */
    transition-duration: 0.4s;
    text-decoration: none;
    overflow: hidden;
    cursor: pointer;
    border-radius: 14px;
}

.whitebut:after {
    content: "";
    background: rgb(255, 255, 255);
    display: block;
    position: absolute;
    padding-top: 300%;
    padding-left: 350%;
    margin-left: -20px!important;
    margin-top: -120%;
    opacity: 0;
    transition: all 0.8s
}

.whitebut:active:after {
    padding: 0;
    margin: 0;
    opacity: 1;
    transition: 0s
}
.UserInfo{
    margin-top: 12vw;
}
.UserInfoLeft{
    width: 20vw;
    height: 20vw;
}
.UserInforight{
    margin-left:3vw;
}

.content .UserInfo{
    margin-top: 12vw;
}
.content .UserInfo li{
    box-sizing: border-box;
    padding: 2.5vw;
    display: flex;
    border-bottom: 1px solid #DDD;
}
.content .UserInfo li .UserInfo-left{
    position: relative;
}
.content .UserInfo li .UserInfo-left img{
    width: 20vw;
    height: 20vw;
}

.content .UserInfo li .UserInfo-left .business-img-quantity{
    width: 5vw;
    height: 5vw;
    font-size: auto;
    background-color: red;
    color: #FFF;
    border-radius: 2.5vw;
    text-align: center;
    line-height: 5vw;
    position: absolute;
    right: -1.5vw;
    top: -1.5vw;
}

.content .UserInfo li .UserInfo-right{
    margin-top: 2%;
    margin-left: 22%;
}
.content .UserInfo li .UserInfo-right h3{
    font-size: 5vw;
    color: #555;
}
.content .UserInfo li .UserInfo-right p{
    margin-top: 2vw;
    font-size: 3vw;
    color: #888;
}


</style>